Optimal. Leaf size=125 \[ -\frac {a (4 A+5 B) \sin ^3(c+d x)}{15 d}+\frac {a (4 A+5 B) \sin (c+d x)}{5 d}+\frac {a (A+B) \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a (A+B) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3}{8} a x (A+B)+\frac {a A \sin (c+d x) \cos ^4(c+d x)}{5 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3996, 3787, 2635, 8, 2633} \[ -\frac {a (4 A+5 B) \sin ^3(c+d x)}{15 d}+\frac {a (4 A+5 B) \sin (c+d x)}{5 d}+\frac {a (A+B) \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3 a (A+B) \sin (c+d x) \cos (c+d x)}{8 d}+\frac {3}{8} a x (A+B)+\frac {a A \sin (c+d x) \cos ^4(c+d x)}{5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 3787
Rule 3996
Rubi steps
\begin {align*} \int \cos ^5(c+d x) (a+a \sec (c+d x)) (A+B \sec (c+d x)) \, dx &=\frac {a A \cos ^4(c+d x) \sin (c+d x)}{5 d}-\frac {1}{5} \int \cos ^4(c+d x) (-5 a (A+B)-a (4 A+5 B) \sec (c+d x)) \, dx\\ &=\frac {a A \cos ^4(c+d x) \sin (c+d x)}{5 d}+(a (A+B)) \int \cos ^4(c+d x) \, dx+\frac {1}{5} (a (4 A+5 B)) \int \cos ^3(c+d x) \, dx\\ &=\frac {a (A+B) \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {a A \cos ^4(c+d x) \sin (c+d x)}{5 d}+\frac {1}{4} (3 a (A+B)) \int \cos ^2(c+d x) \, dx-\frac {(a (4 A+5 B)) \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (c+d x)\right )}{5 d}\\ &=\frac {a (4 A+5 B) \sin (c+d x)}{5 d}+\frac {3 a (A+B) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (A+B) \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {a A \cos ^4(c+d x) \sin (c+d x)}{5 d}-\frac {a (4 A+5 B) \sin ^3(c+d x)}{15 d}+\frac {1}{8} (3 a (A+B)) \int 1 \, dx\\ &=\frac {3}{8} a (A+B) x+\frac {a (4 A+5 B) \sin (c+d x)}{5 d}+\frac {3 a (A+B) \cos (c+d x) \sin (c+d x)}{8 d}+\frac {a (A+B) \cos ^3(c+d x) \sin (c+d x)}{4 d}+\frac {a A \cos ^4(c+d x) \sin (c+d x)}{5 d}-\frac {a (4 A+5 B) \sin ^3(c+d x)}{15 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.25, size = 77, normalized size = 0.62 \[ \frac {a \left (-160 (2 A+B) \sin ^3(c+d x)+480 (A+B) \sin (c+d x)+15 (A+B) (12 (c+d x)+8 \sin (2 (c+d x))+\sin (4 (c+d x)))+96 A \sin ^5(c+d x)\right )}{480 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.43, size = 88, normalized size = 0.70 \[ \frac {45 \, {\left (A + B\right )} a d x + {\left (24 \, A a \cos \left (d x + c\right )^{4} + 30 \, {\left (A + B\right )} a \cos \left (d x + c\right )^{3} + 8 \, {\left (4 \, A + 5 \, B\right )} a \cos \left (d x + c\right )^{2} + 45 \, {\left (A + B\right )} a \cos \left (d x + c\right ) + 16 \, {\left (4 \, A + 5 \, B\right )} a\right )} \sin \left (d x + c\right )}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.26, size = 184, normalized size = 1.47 \[ \frac {45 \, {\left (A a + B a\right )} {\left (d x + c\right )} + \frac {2 \, {\left (45 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 45 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{9} + 130 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 290 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 464 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 400 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 190 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 350 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 195 \, A a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 195 \, B a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{5}}}{120 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.60, size = 128, normalized size = 1.02 \[ \frac {\frac {a A \left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{5}+a A \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+a B \left (\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {a B \left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{3}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.34, size = 124, normalized size = 0.99 \[ \frac {32 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a - 160 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a + 15 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a}{480 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.81, size = 212, normalized size = 1.70 \[ \frac {\left (\frac {3\,A\,a}{4}+\frac {3\,B\,a}{4}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\left (\frac {13\,A\,a}{6}+\frac {29\,B\,a}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\left (\frac {116\,A\,a}{15}+\frac {20\,B\,a}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (\frac {19\,A\,a}{6}+\frac {35\,B\,a}{6}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (\frac {13\,A\,a}{4}+\frac {13\,B\,a}{4}\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}+\frac {3\,a\,\mathrm {atan}\left (\frac {3\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A+B\right )}{4\,\left (\frac {3\,A\,a}{4}+\frac {3\,B\,a}{4}\right )}\right )\,\left (A+B\right )}{4\,d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________